<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$script="function addGridItem(Selector){ $(Selector).each(function(){ $.fn.widgetContainer.addItem({item:$(this).val(),id:'Choose_DO_Container'});}); $.fn.yiiGridView.update('Choose_DO_Grid',{'data':'&'+$.fn.widgetContainer.AllItem('Choose_DO_Container','rm') }); }";
$cs = Yii::app()->getClientScript();
$cs->registerScript('Gridfile',$script,CClientScript::POS_END);
$search = CHtml::tag('div', array('class'=>'summary'),CHtml::label('Search', 'search')." ".CHtml::textField('s','',array('onkeydown'=>'if (event.keyCode == 13) {$.fn.yiiGridView.update("Choose_DO_Grid",{"data":"&s="+$(this).val()});}')));
?>
<fieldset class="ui-widget section">
    <legend class="ui-widget-header ui-corner-all">Added D/O</legend>
<?php   $this->widget('application.widgets.container.container',array('id'=>'Choose_DO_Container','items'=>$items));
        $this->widget('application.widgets.button.button', array(
                                                        'options'=>array('label'=>'DO','icon'=>'ui-icon-plusthick','click'=>"js:function() {addGridItem('input[name=\'Choose_DO_Grid_c0[]\']:checked')}"),
                                                        'name'=>'addDOcontainer',
                                                        ));
?>
</fieldset>

<fieldset class="ui-widget section">
    <legend class="ui-widget-header ui-corner-all">Individual D/O</legend>
<?php echo $gridView ?>
</fieldset>